package com.example.Transaction.service.impl;
import com.example.Transaction.domain.Transaction;
import com.example.Transaction.mapper.TransactionMapper;
import com.example.Transaction.service.ITransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class TransactionServiceImpl implements ITransactionService {
    @Autowired
    private TransactionMapper transactionMapper;

    /**
     * 查询用户
     * @param transaction
     * @return
     */
    @Override
    public List<Transaction> selectTransaction(Transaction transaction) {
        return transactionMapper.selectTransaction(transaction);
    }

    /**
     * 新增用户
     * @param transaction
     */
    @Override
    public void insertTransaction(Transaction transaction) {
        transactionMapper.insertTransaction(transaction);
    }

    /**
     * 修改用户
     * @param transaction
     */
    @Override
    public void updateTransactionByOrder_id(Transaction transaction) {
        transactionMapper.updateTransactionByOrder_id(transaction);
    }

    /**
     * 删除用户
     * @param order_id
     */
    @Override
    public void delTransactionByOrder_id(String order_id) {
        transactionMapper.delTransactionByOrder_id(order_id);
    }

    @Override
    public Transaction selectOneTransaction(Transaction transaction) {
        return transactionMapper.selectOneTransaction(transaction);
    }

}
